package com.chance.cc.crawler.prod.command.trigger.domain.vm.bitauto;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.BitAutoCommonCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.adhoc.BitAutoForumReplySimpleCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.adhoc.BitAutoWebHaoArticleAllSimpleCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2021-04-13 17:50:30
 * @email okprog@sina.com
 */
public class BitAutoSimpleCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {
//        publishBitAutoCrawlerScheduleTriggerInfo(BitAutoArticleSimpleCrawlerJob.bitAutoScheduler());
//
//       publishBitAutoCrawlerScheduleTriggerInfo(BitAutoForumReplySimpleCrawlerSchedulerJob.bitAutoScheduler());
        //易车新闻板块
        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoWebArticleTraceCrawlerSchedulerJob.bitAutoScheduler());
        //易车视频板块
       // publishBitAutoCrawlerScheduleTriggerInfo(BitAutoWebVideoTraceCrawlerSchedulerJob.bitAutoScheduler());
//
//        publishBitAutoCrawlerScheduleTriggerInfo(BitAutoHaoArticleSimpleCrawlerSchedulerJob.bitAutoScheduler());

      //  publishBitAutoCrawlerScheduleTriggerInfo(BitAutoPraiseSimpleCrawlerSchedulerJob.bitAutoScheduler());//车系页口碑临时采集

//        publishBitAutoCrawlerScheduleTriggerInfo(BitAutoVideoSimpleCrawlerSchedulerJob.bitAutoScheduler());

        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoVideoArticleSimpleCrawlerSchedulerJob.bitAutoScheduler());
        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoWebCarTypeCrawlerSchedulerJob.bitAutoScheduler());
    //四垂媒采集任务
        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoSimpleRedisToRunCrawlerScheduleJob.Article());//文章
        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoSimpleRedisToRunCrawlerScheduleJob.video());//视频

        //易车车系url临时采集
        //publishBitAutoCrawlerScheduleTriggerInfo(BitAutoCarTypeSimpleCrawlerScheduleJob.bitAutoScheduler());
       // publishBitAutoCrawlerScheduleTriggerInfo(BitAutoSimpleRedisToRunCrawlerScheduleJob.Article());


        //易车号全部文章
        publishBitAutoHaoArticleAllCrawlerScheduleTriggerInfo();

    }

    /**
     * 发布汽车之家临时采集trigger info

     */
    public static void publishBitAutoCrawlerScheduleTriggerInfo(CrawlerJob crawlerJob){

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoCommonCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "易车临时采集任务执行，单次执行"
        );
    }

    /**
     * 发布汽车之家临时采集trigger info

     */
    public static void publishBitAutoHaoArticleAllCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleAllSimpleCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoCommonCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 18 25-29 11 ? 2021-2021",
                "易车号全部文章20211125-20211129下午六点临时采集"
        );
    }

}
